package com.itheima.run;
/*
设置线程优先级

 */
public class Demo04 {

    public static void main(String[] args) {
        //想要创建线程对象 必须使用 Thread

        MyRunnable my = new MyRunnable();
        Thread thread = new Thread(my);//带参数的创建方法
        thread.setPriority(10);
        thread.start();//开启线程的核心 还是start

        Thread thread2 = new Thread(my);
        thread2.start();
        Thread thread3 = new Thread(my);
        thread3.setPriority(1);
        thread3.start();



    }
}
